-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add form in Student View for editing enrollment information #1346
Conversation
Awesome work. I’ll review tomorrow.
…On Tue, Jan 15, 2019 at 21:44 Paul Bitutsky ***@***.***> wrote:
This resolves issue #1274 <#1274>.
I've added a form to the student view that allows admin/staff to edit
information about students like their name, SID, secondary auth, section,
and role. Users cannot, however, change students' email addresses since
much of the back-end code relies on using the email as an identifier. Maybe
this could be a feature in the future.
[image: screen shot 2019-01-16 at 12 30 51 am]
<https://user-images.githubusercontent.com/6360587/51228670-6a56c080-1927-11e9-802e-23cc8a931a1c.png>
[image: screen shot 2019-01-16 at 12 30 55 am]
<https://user-images.githubusercontent.com/6360587/51228694-7f335400-1927-11e9-8911-da38132043dd.png>
[image: screen shot 2019-01-16 at 12 31 37 am]
<https://user-images.githubusercontent.com/6360587/51228700-85293500-1927-11e9-8be8-da642eb1c949.png>
[image: screen shot 2019-01-16 at 12 31 45 am]
<https://user-images.githubusercontent.com/6360587/51228704-88242580-1927-11e9-9828-9b6ead8c18ec.png>
------------------------------
You can view, comment on, or merge this pull request online at:
#1346
Commit Summary
- Add form in Student View for editing enrollment information
File Changes
- *M* server/controllers/admin.py
<https://github.com/okpy/ok/pull/1346/files#diff-0> (17)
- *M* server/templates/staff/student/overview.html
<https://github.com/okpy/ok/pull/1346/files#diff-1> (29)
Patch Links:
- https://github.com/okpy/ok/pull/1346.patch
- https://github.com/okpy/ok/pull/1346.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1346>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACysaoL_0fTI1aUo1GSWbAnpnVusKwILks5vDrwqgaJpZM4aCW2N>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits
server/controllers/admin.py
Outdated
else: | ||
email, role = form.email.data, form.role.data | ||
Enrollment.enroll_from_form(cid, form) | ||
flash("Edited User Successfully", 'success') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, prefer single quotes unless a single quote is used in the string. (I know this isn't consistent everywhere).
server/controllers/admin.py
Outdated
flash("Edited User Successfully", 'success') | ||
else: | ||
if form.is_submitted(): | ||
flash("There is an issue with your request.", 'error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
This might also be a nice opportunity for a test, but I won't hold you to it if you want to get it shipped now :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This resolves issue #1274.
I've added a form to the student view that allows admin/staff to edit information about students like their name, SID, secondary auth, section, and role. Users cannot, however, change students' email addresses since much of the back-end code relies on using the email as an identifier. Maybe this could be a feature in the future.